package top.someapp.dxf2dsvg.cad;

import com.aspose.cad.fileformats.cad.cadobjects.Cad3DPoint;
import com.aspose.cad.fileformats.cad.cadobjects.CadBaseEntity;
import com.aspose.cad.fileformats.cad.cadobjects.CadBlockEntity;
import com.aspose.cad.fileformats.cad.cadobjects.CadXdataContainer;
import com.aspose.cad.fileformats.cad.cadobjects.attentities.CadAttDef;
import com.aspose.cad.fileformats.cad.cadparameters.CadDoubleParameter;
import com.aspose.cad.fileformats.cad.cadparameters.CadShortParameter;
import com.aspose.cad.fileformats.cad.cadparameters.CadStringParameter;
import com.aspose.cad.system.collections.Generic.Dictionary;

import javax.annotation.Nonnull;

/**
 * @author zwz
 * Created on 2020-04-22
 */
public class BlockEntity {
    private final CadBlockEntity cadBlockEntity;

    BlockEntity(@Nonnull CadBlockEntity cadBlockEntity) {
        this.cadBlockEntity = cadBlockEntity;
    }

    public CadShortParameter getEndBlockAttribute370() {
        return cadBlockEntity.getEndBlockAttribute370();
    }

    public void setEndBlockAttribute370(CadShortParameter cadShortParameter) {
        cadBlockEntity.setEndBlockAttribute370(cadShortParameter);
    }

    public CadShortParameter getBlockAttribute370() {
        return cadBlockEntity.getBlockAttribute370();
    }

    public void setBlockAttribute370(CadShortParameter cadShortParameter) {
        cadBlockEntity.setBlockAttribute370(cadShortParameter);
    }

    public CadStringParameter getDescription() {
        return cadBlockEntity.getDescription();
    }

    public void setDescription(CadStringParameter cadStringParameter) {
        cadBlockEntity.setDescription(cadStringParameter);
    }

    public CadDoubleParameter getBlockAttribute48() {
        return cadBlockEntity.getBlockAttribute48();
    }

    public void setBlockAttribute48(CadDoubleParameter cadDoubleParameter) {
        cadBlockEntity.setBlockAttribute48(cadDoubleParameter);
    }

    public CadDoubleParameter getEndBlockAttribute48() {
        return cadBlockEntity.getEndBlockAttribute48();
    }

    public void setEndBlockAttribute48(CadDoubleParameter cadDoubleParameter) {
        cadBlockEntity.setEndBlockAttribute48(cadDoubleParameter);
    }

    public CadShortParameter getBlockAttribute62() {
        return cadBlockEntity.getBlockAttribute62();
    }

    public void setBlockAttribute62(CadShortParameter cadShortParameter) {
        cadBlockEntity.setBlockAttribute62(cadShortParameter);
    }

    public CadShortParameter getEndBlockAttribute62() {
        return cadBlockEntity.getEndBlockAttribute62();
    }

    public void setEndBlockAttribute62(CadShortParameter cadShortParameter) {
        cadBlockEntity.setEndBlockAttribute62(cadShortParameter);
    }

    public Cad3DPoint getBasePoint() {
        return cadBlockEntity.getBasePoint();
    }

    public void setBasePoint(Cad3DPoint cad3DPoint) {
        cadBlockEntity.setBasePoint(cad3DPoint);
    }

    public CadBaseEntity[] getEntities() {
        return cadBlockEntity.getEntities();
    }

    public void setEntities(CadBaseEntity[] cadBaseEntities) {
        cadBlockEntity.setEntities(cadBaseEntities);
    }

    public short getFlags() {
        return cadBlockEntity.getFlags();
    }

    public void setFlags(short i) {
        cadBlockEntity.setFlags(i);
    }

    public CadShortParameter getAttribute71() {
        return cadBlockEntity.getAttribute71();
    }

    public void setAttribute71(CadShortParameter cadShortParameter) {
        cadBlockEntity.setAttribute71(cadShortParameter);
    }

    public String getBlockHandle() {
        return cadBlockEntity.getBlockHandle();
    }

    public void setBlockHandle(String s) {
        cadBlockEntity.setBlockHandle(s);
    }

    public boolean getEndBlockModelSegregated() {
        return cadBlockEntity.getEndBlockModelSegregated();
    }

    public void setEndBlockModelSegregated(boolean b) {
        cadBlockEntity.setEndBlockModelSegregated(b);
    }

    public boolean getBlockModelSegregated() {
        return cadBlockEntity.getBlockModelSegregated();
    }

    public void setBlockModelSegregated(boolean b) {
        cadBlockEntity.setBlockModelSegregated(b);
    }

    public String getEndBlockHandle() {
        return cadBlockEntity.getEndBlockHandle();
    }

    public void setEndBlockHandle(String s) {
        cadBlockEntity.setEndBlockHandle(s);
    }

    public String getName() {
        return cadBlockEntity.getName();
    }

    public void setName(String s) {
        cadBlockEntity.setName(s);
    }

    public CadStringParameter getSoftOwner() {
        return cadBlockEntity.getSoftOwner();
    }

    public void setSoftOwner(CadStringParameter cadStringParameter) {
        cadBlockEntity.setSoftOwner(cadStringParameter);
    }

    public String getLayerName() {
        return cadBlockEntity.getLayerName();
    }

    public void setLayerName(String s) {
        cadBlockEntity.setLayerName(s);
    }

    public CadStringParameter getEndBlockLayerName() {
        return cadBlockEntity.getEndBlockLayerName();
    }

    public void setEndBlockLayerName(CadStringParameter cadStringParameter) {
        cadBlockEntity.setEndBlockLayerName(cadStringParameter);
    }

    public CadStringParameter getAttribute6() {
        return cadBlockEntity.getAttribute6();
    }

    public void setAttribute6(CadStringParameter cadStringParameter) {
        cadBlockEntity.setAttribute6(cadStringParameter);
    }

    public CadStringParameter getEndBlockAttribute6() {
        return cadBlockEntity.getEndBlockAttribute6();
    }

    public void setEndBlockAttribute6(CadStringParameter cadStringParameter) {
        cadBlockEntity.setEndBlockAttribute6(cadStringParameter);
    }

    public CadXdataContainer getXdataContainer() {
        return cadBlockEntity.getXdataContainer();
    }

    public void setXdataContainer(CadXdataContainer cadXdataContainer) {
        cadBlockEntity.setXdataContainer(cadXdataContainer);
    }

    public Dictionary<String, CadAttDef> getAttDefs() {
        return cadBlockEntity.getAttDefs();
    }

    public void addEntity(CadBaseEntity cadBaseEntity) {
        cadBlockEntity.addEntity(cadBaseEntity);
    }

    @Override
    public String toString() {
        StringBuilder info = new StringBuilder();
        Cad3DPoint basePoint = getBasePoint();
        info.append("{basePoint = (").append(basePoint.getX())
                .append(", ").append(basePoint.getY())
                .append(", ").append(basePoint.getZ()).append("), ")
                .append("entities.length = ").append(cadBlockEntity.getEntities().length)
                .append("}");
        return info.toString();
    }
}
